From 4bab084046fc799dd27d37d4160b26da54470742 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Mon, 12 Mar 2007 22:26:31 +0000 Subject: [PATCH] Finalize "Multiple URL support" code. Move add_url to waypt.c. Now called 'waypt_add_url'. --- util.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/util.c b/util.c index 135574c68..1af7d25e6 100644 --- a/util.c +++ b/util.c @@ -1641,30 +1641,3 @@ char *get_filename(const char *fname) return (res == NULL) ? (char *) fname : ++res; } - -void -add_url(waypoint *wpt, char *link, char *url_link_text) -{ - /* Special case first one; it goes right into the waypoint. */ - if ((wpt->url == NULL) && (wpt->url_link_text == NULL)) { - wpt->url = link; - wpt->url_link_text = url_link_text; - } else { - url_link *tail; - url_link *new_link = xcalloc(sizeof(url_link), 1); - new_link->url = link; - new_link->url_link_text = url_link_text; - - /* Find current end of chain and tack this onto the end.. */ - for (tail = wpt->url_next;;tail = tail->url_next) { - if (tail == NULL) { - wpt->url_next = new_link; - break; - } - if (tail->url_next == NULL) { - tail->url_next = new_link; - break; - } - } - } -} -- 2.30.2